#ifndef RTXTFILEMODEL_H
#define RTXTFILEMODEL_H
#include <QObject>
#include "rfilemodel.h"
#include "rengine.h"

class RTxtFileModel : public RFileModel
{
    Q_OBJECT
public:
    explicit RTxtFileModel(REngine& engine, QObject *parent = 0);

public: //From RFileModel
    int lineNumberOfChapter(int chapterIndex);
    int currentChapterIndex();
    void chapters(QStringList& chapterList);

signals:

protected: //From RFileModel
    bool analyzeFile();
    bool openFile(const QString& fileName);
    bool saveFileLinePosition();
    bool readFileLinePosition();
    bool initFileInfo();
    QVariant data(int row) const;

public slots:

private:

private:
    QList<int> m_file_chapter_line;
};

#endif // RTXTFILEMODEL_H
